package io.github.ali.commons.bean;

/**
 * boolean结果携带其他参数
 * 
 * @author fuli
 * @date 2019年6月18日
 * @version 1.0.0
 */
public class BooleanWrapResult<T> {
	private boolean result;
	private T value;
	
	public BooleanWrapResult() {
		result = Boolean.FALSE;
		value = null;
	}

	public BooleanWrapResult(boolean result) {
		this.result = result;
		value = null;
	}
	
	public BooleanWrapResult(T value) {
		result = Boolean.FALSE;
		this.value = null;
	}
	
	public BooleanWrapResult(boolean result,T value) {
		this.result = result;
		this.value = value;
	}
	
	public boolean isTrue() {
		return result;
	}
	public boolean isFalse() {
		return !result;
	}
	public void setResult(boolean result) {
		this.result = result;
	}
	public T getValue() {
		return value;
	}
	public void setValue(T value) {
		this.value = value;
	}
}
